# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Marcin (CTRL) Wieczorek <marcin@marcin.co>
# Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to>

pkgname=umockdev
pkgver=0.17.18
pkgrel=1
pkgdesc="Record/mock hardware devices for bug reports and regression tests"
arch=('loong64' 'x86_64')
url="https://github.com/martinpitt/umockdev/"
license=('LGPL')
depends=('systemd' 'libgudev')
makedepends=('meson' 'gobject-introspection' 'gtk-doc' 'vala')
source=(https://github.com/martinpitt/umockdev/releases/download/$pkgver/$pkgname-$pkgver.tar.xz)
sha256sums=('466ad3e0c715e56f50ea6a965165823d073a84137acb8a1e39b66573648a985f')

build() {
  cd $pkgname-$pkgver

  arch-meson -Dgtk_doc=true ../build
  ninja -v -C ../build
}

check() {
  cd $pkgname-$pkgver

  meson test -C ../build --print-errorlogs
}

package() {
  cd $pkgname-$pkgver

  DESTDIR="${pkgdir}" meson install -C ../build
}
